<?
session_start();
//session_destroy();
require_once ('../Dataprovider/Dataconfig.php');
require ('../Dataprovider/Dataconnection.php');

?>
<!doctype HTML public "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">

<html>

	<head>

		<title>Admin Tools</title>

		<meta http-equiv="content-type" content="text/HTML; charset=UTF-8" />
                <link rel="stylesheet" href="admin.css" type="text/css" media="all"/>
                <link rel="stylesheet" href="../css/style.css" type="text/css" media="all"/>
                <script type="text/javascript" src="../js/jquery-1.3.2.js"></script>
		          <script type="text/javascript" src="admin.js"></script>
                <script type="text/javascript" src="../js/vadilation.js"></script>
                <script type="text/javascript" src="../js/block/jquery.blockUI.js"></script>
<!--                <link rel="stylesheet" href="../lib.css/button.css" />-->
                <link rel="stylesheet" href="tab.css" />
                <link rel="stylesheet" href="input.css" />

                <link rel="stylesheet" href="../lib/jwysiwyg/jwysiwyg/jwysiwyg/jquery.wysiwyg.css" type="text/css" />
                <script type="text/javascript" src="../lib/jwysiwyg/jwysiwyg/jwysiwyg/jquery.wysiwyg.js"></script>
                <script type="text/javascript" src="../lib/ckeditor/ckeditor.js"></script>

                <script type="text/javascript" src="ajax-file-upload/js/ajaxupload.3.5.js" ></script>
                <link rel="stylesheet" type="text/css" href="ajax-file-upload/styles.css" />
	</head>

</html>

<body style="margin: 8px">
    <?
    
    $au=$_SESSION["USER"]["AUR"];
    if(!isset($au) || $au!="admin"){
        include "login.php";
    }else{
    ?>
    <div id="uicontent" style="width: 100%;height: 100%;display: none">Please wait...</div>

    <div id="menu" class="hidden"><? include( "01_menu.php" ); ?></div>

	<div id="body">
            <b>Manage</b>

            <a href="" target="_blank" style="float: right;"><?= empty( $_GET[ "link" ] ) ? "Window" : "Admin" ?></a>

            <hr />
            <div id="id-iframe" style=";" >
                Please wait...
            </div>
            <div id="id-iframe2" style=";display: none;position: relative" >
                <div class="content">
                    Please wait...
                </div>
                <div class="close-button" onclick="hidebox2();" title="Back"><img src="../images/icon/left.png"/></div>
                <div class="close-button left" onclick="hidebox2();" title="Back to list"><img src="../images/back1.png"/></div>
            </div>


            <script>

                    document.getElementById( 'id-iframe' ).style.height = ( window.innerHeight - 52 ) + "px";
                    document.getElementById( 'id-iframe2' ).style.height = ( window.innerHeight - 52 ) + "px";

            </script>

        </div>

        

	<script>
                $(document).ready(function(){
                    showmsg("Loadding...",2000);
                    loadhtml("../Controller/?AUnit=summary",null);
                });
		document.getElementById( "menu" ).style.left = "-256px";

		function menu_on( ) {

			count = 1;

			try { clearInterval( interval ); } catch( exception ) { } 

			var interval = setInterval( function( ) {

				count = count * 2;

				document.getElementById( "menu" ).style.left = parseInt( document.getElementById( "menu" ).style.left ) + count + "px";

				if( parseInt( document.getElementById( "menu" ).style.left ) >= 0 ) {

					clearInterval( interval );

					document.getElementById( "menu" ).style.left = "0px"

				}

			}, 10 );

		}

		function menu_off( ) {

			if( window.event.x < 136 ) return false;

			count = 1;

			try { clearInterval( interval ); } catch( exception ) { } 

			var interval = setInterval( function( ) {

				count = count * 2;

				document.getElementById( "menu" ).style.left = parseInt( document.getElementById( "menu" ).style.left ) - count + "px";

				if( parseInt( document.getElementById( "menu" ).style.left ) <= -256 ) {

					clearInterval( interval );

					document.getElementById( "menu" ).style.left = "-256px"

				}

			}, 10 );

		}

		document.getElementById( "menu" ).onmouseover	= function( ) { menu_on( );		}
		document.getElementById( "menu" ).onmouseout	= function( ) { menu_off( );	}

	</script>
        <?
    }
        ?>
</body>

</html>
